package com.yida.system.api;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

import com.yida.common.core.constant.SecurityConstants;
import com.yida.common.core.constant.ServiceNameConstants;
import com.yida.common.core.domain.R;
import com.yida.system.api.domain.EsbRequestLog;
import com.yida.system.api.factory.RemoteLogFallbackFactory;

/**
 * 日志服务
 *
 * @author yida
 */
@FeignClient(contextId = "remoteEsbRequestLogService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteLogFallbackFactory.class)
public interface RemoteEsbRequestLogService {

    /**
     * 新增企业总线请求日志
     * 
     * @param esbRequestLog 企业总线请求日志
     * @return
     */
    @PostMapping("/system/esb/request/log/inner/save")
    R<Integer> innerSave(@RequestBody EsbRequestLog esbRequestLog, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
